package com.hsjk.szwj.module.pay.dal.dataobject.system;

import com.baomidou.mybatisplus.annotation.TableName;
import com.hsjk.szwj.framework.tenant.core.db.TenantBaseDO;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalDateTime;

/**
 * @author chenjiawei
 * @desc
 * @Date 2023/08/22 16:43
 **/
@TableName("system_mch_notify_record")
@Data
@EqualsAndHashCode(callSuper = true)
public class MchNotifyRecordDO extends TenantBaseDO {
    //订单类型:1-支付,2-退款, 3-转账
    public static final int TYPE_PAY_ORDER = 1;
    public static final int TYPE_REFUND_ORDER = 2;
    public static final int TYPE_TRANSFER_ORDER = 3;

    //通知状态
    public static final int STATE_ING = 1;
    public static final int STATE_SUCCESS = 2;
    public static final int STATE_FAIL = 3;

    private Long id;
    /**
     * 订单ID
     */
    private Long orderId;
    /**
     * 订单类型:1-支付,2-退款
     */
    private Integer orderType;
    /**
     * 商户订单号
     */
    private Long mchOrderId;
    /**
     * 商户号
     */
    private Long mchId;
    /**
     * 服务商号
     */
    private Long isvId;
    /**
     * 应用ID
     */
    private Long appId;
    /**
     * 通知地址
     */
    private String notifyUrl;
    /**
     * 通知响应结果
     */
    private String resResult;
    /**
     * 通知次数
     */
    private Integer notifyCount;
    /**
     * 最大通知次数, 默认6次
     */
    private Integer notifyCountLimit;
    /**
     * 通知状态,1-通知中,2-通知成功,3-通知失败
     */
    private Integer state;
    /**
     * 最后一次通知时间
     */
    private LocalDateTime lastNotifyTime;
}
